﻿using Konveyer.Core.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Konveyer.Core.Attributes
{
    public enum OperationStep
    {
        RequestStart = 0 ,
        PredataLoading = 100,
        DataLoading = 130,
        PostDataloading = 190,

        PreValidation = 200,
        Validation = 230,
        PostValidation = 290,

        PreOperation = 300,
        Operation = 330,
        PostOperation = 390,

        PerLogging = 400,
        Logging = 430,
        PostLogging = 490,

        RequestEnd = 999999
    }

   

    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true , Inherited = true)]
    public class BeltAttribute : Attribute
    {
        public OperationStep Step{get;set;}
        public Type Widget { get; set; }
        public Action<IWidget> OnException { get; set; }
        public Action<IWidget> OnStart { get; set; }
        public Action<IWidget> OnEnd { get; set; }
        public string Description { get; set; }
    }
}
